<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" value="点我获取当前地址" onclick="huoqu()">
<input type="button" value="点我刷新当前地址" onclick="shuaxin()">
<input type="button" value="点我跳转到新地址" onclick="tiaozuang()">
<script type="text/javascript">
    // 获取
    function huoqu() {
        console.log(location.href);
    }
    // 刷新
    function shuaxin() {
        location.reload();
    }
    // 跳转
    function tiaozuang() {
        location.href = "http://www.iming.info";
    }
</script>
</body>
</html>